import { createRoot } from "react-dom/client";
import "@/assets/css/index.css";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import { routes } from "@/route/routes";
import { CookiesProvider } from "react-cookie";
import { I18nextProvider } from "react-i18next";
import i18n from "@/i18n";
import ReactQueryProviders from "@/components/providers/react-query-provider";
import { Toaster } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
const router = createBrowserRouter(routes);

createRoot(document.getElementById("root")!).render(
  <>
    <Toaster />
    <I18nextProvider i18n={i18n}>
      <CookiesProvider>
        <ReactQueryProviders>
          <TooltipProvider delayDuration={0}>
            <RouterProvider router={router}></RouterProvider>
          </TooltipProvider>
        </ReactQueryProviders>
      </CookiesProvider>
    </I18nextProvider>
  </>
);
